package com.wang.ebook.adapter;

import com.wang.ebook.activity.R;
import com.wang.ebook.bean.EBookBean;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class ChapterAdapter extends BaseAdapter {
	Context mContext;
	EBookBean mEBookBean ;
	
	private ChapterAdapter(Context context , EBookBean bookBean){
		mContext = context;
		mEBookBean = bookBean;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mEBookBean.getHashMap().size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = LayoutInflater.from(mContext).inflate(R.layout.chapter_list, null);
		}
		
		TextView tv1 = (TextView)convertView.findViewById(R.id.chapter_text);
		TextView tv2 = (TextView)convertView.findViewById(R.id.chapter_pos);
		
		
		return null;
	}

}
